<%
layout("/layout.html"){
%>
<div id=nav>
    <a href="https://git.oschina.net/xiandafu/eval"><h1>评级</h1></a>

    <ul>


    </ul>
    <ul>
        <li><a href="${ctxPath}/001.html">简单求和</a>
        <li><a class=active  href="${ctxPath}/002.html">脚本运行</a>
        <li><a href="${ctxPath}/003.html">决策树</a>    
        
        </ul>
</div>

<article>
    <h2>直接规则脚本</h2>
    <h5>使用方法:直接运行或者修改模型后运行</h5>
    <form id="inputForm" name="inputForm">
        <textarea id="code" name="code">
<?xml version="1.0" encoding="UTF-8"?>
<workspace name="评级">
    <project name="银行评级">
        <doc name="评级得分" f="sum">
         
            <node name="非财务信息" f="sum">
                <node name="上访次数" f="script">
                    <![CDATA[
                        var c =上访次数;
                        var 参数 = 0;
                        if(c>10){
                            参数=10;
                        }else{
                            参数=100;
                        }
                        return 参数;

                    ]]>
                
                </node>
            </node>         
        </doc>
    </project>
</workspace>

</textarea>
<div>
            变量名称1:<input name="paraName0" value="上访次数"> 值:<input
                name="paraValue0" value="50">
        </div>
        <div>
            变量名称2:<input name="paraName1" value=""> 值:<input
                name="paraValue1" value="">
        </div>
        <div>
            变量名称3:<input name="paraName2" value=""> 值:<input
                name="paraValue2" value="">
        </div>
        <div>
            变量名称4:<input name="paraName3" value=""> 值:<input
                name="paraValue3" value="">
        </div>
        <div>
            变量名称5:<input name="paraName4" value=""> 值:<input
                name="paraValue4" value="">
        </div>
        <button type="button" id="run">计算结果</button>
        <input id="result" name="result" readonly value="">
          <button type="button" id="validate">语法校验</button>

    </form>
<%}%>
